<template>
	<view>
		<view v-for="(item,index) in list" :key="index" class="list" @click="select(item)">
			<image :src="item.cover" style="width:200rpx;height: 200rpx;border-radius: 10rpx;"></image>
			<view style="margin-left: 10rpx;width: 500rpx;display: flex;flex-direction: column;justify-content: space-between;">
				<view class="u-flex u-row-between">
					<view style="font-weight: bold;font-size: 32rpx;">{{item.storeName}}</view>
				</view>
				<view style="color: #909090;margin: 20rpx 0;">{{item.address}}</view>
				<view style="font-size: 22rpx;color: #fff;display: flex;" v-if="item.cpNum">
					<view style="background:#379BFC;padding: 7rpx 15rpx;border-radius: 10rpx;">
						车位总数量：{{item.cpNum}}</view>
						<view style="padding: 7rpx 15rpx;border-radius:10rpx;background: #F29100;margin-left: 10rpx;" v-if="item.wxCpNum" >装修中：{{item.wxCpNum}}</view>
					<view style="padding: 7rpx 15rpx;border-radius:10rpx;margin-left: 10rpx;"
						:style="{background:item.canCpNum===item.cpNum?'#ff4f4f':'#49BD40' }"  v-if="!item.wxCpNum" >使用中：{{item.canCpNum}}</view>
				</view>
				<view style="font-size: 22rpx;margin-top: 20rpx;" v-if="item.cpNum">
					<text class="u-margin-right-10">价格:{{item.basePrice}}元/{{item.baseTime}}分钟</text>
					<text>超出：{{item.overPrice}}元/分钟</text>
				</view>
			</view>
			<view style="position: absolute;bottom: 20rpx;right: 20rpx;" @click.stop="openmap(item)">
				<image src="../../static/daohang.png" style="width: 56rpx;height: 56rpx;"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			 list:{
				 type:Array,
				 default: () => []
	
			 }
		},
		data(){
			return{
				
			}
		},
		methods:{
			select(item){
				uni.navigateTo({
				   url:"../../pages/myStore/index?id="+ item.id+'&iscar='+item.type
				})
			}
		}
	}
</script>

<style>
	.list {
		background: #FFFFFF;
		padding: 30rpx;
		display: flex;
		position: relative;
		margin-bottom: 20rpx;
	}
</style>
